package cn.com.kingkit.mvc.service.impl.business;

import java.io.Serializable;

import cn.com.kingkit.mvc.exception.BusinessException;
import cn.com.kingkit.mvc.model.business.MaterialType;
import cn.com.kingkit.mvc.service.BaseService;

public class MaterialTypeService extends BaseService<MaterialType> implements Serializable{
	public void save(MaterialType mType) throws BusinessException{
		if (null != mType) {
			if(0 != mType.getId()){
				update(mType);
			}
			else{
				add(mType);
			}
		}else {
			throw new BusinessException("类型Id不能为空");
		}
	}
}
